﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE">
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <title>易淘商城--支付页-成功</title>
    <link rel="icon" href="/assets/img/favicon.ico">
    <link rel="stylesheet" type="text/css" href="css/webbase.css" />
    <link rel="stylesheet" type="text/css" href="css/pages-paysuccess.css" />
</head>
<body>
    <!--head-->
    <div id="paySvm">
        <div class="top">
            <shortcut />
        </div>
        <div class="cart py-container">
            <!--logoArea-->
            <div class="logoArea">
                <div class="fl logo"><span class="title">支付页</span></div>
            </div>
            <!--主内容-->
            <div class="paysuccess">
                <div class="success">
                    <h3><img src="img/_/right.png" width="48" height="48">　恭喜您，支付成功啦！</h3>
                    <div class="paydetail">
                        <p>支付方式：微信支付</p>
                        <p>支付金额：￥{{totalPay}}元</p>
                        <p class="button">
                            <a href="home-index.html" class="sui-btn btn-xlarge btn-danger">查看订单</a>&nbsp;&nbsp;&nbsp;&nbsp;
                            <a href="index.html" class="sui-btn btn-xlarge ">继续购物</a>
                        </p>
                    </div>
                </div>

            </div>
        </div>
    </div>
    <script src="./js/vue/vue.js"></script>
    <script src="./js/axios.min.js"></script>
    <script src="./js/common.js"></script>
    <script type="text/javascript">
        var payVm = new Vue({
            el: "#paySvm",
            data: {
                yt,
                totalPay: 0, //总金额
            },
            created() {
                yt.verifyUser().then(resp => {
                    if (resp.data.result) {
                        this.totalPay = parseFloat(yt.store.get("totalPay")).toFixed(2);
                        //1.删除本地数据
                        yt.store.del("selectedCarts");
                        yt.store.del("orderId");
                    }
                    else {
                        location.href = "/login.html?returnUrl=" + location.href;
                    }
                }).catch(() => {
                    alert("数据异常");
                });
            },
            components: {
                shortcut: () => import("/js/pages/shortcut.js")
            },
        });
    </script>

    <!-- 底部栏位 -->
    <!--页面底部，由js动态加载-->
    <script type="text/javascript" src="js/plugins/jquery/jquery.min.js"></script>
    <div class="clearfix footer"></div>
    <script type="text/javascript">$(".footer").load("foot.html");</script>
    <!--页面底部END-->


    <script type="text/javascript" src="js/plugins/jquery.easing/jquery.easing.min.js"></script>
    <script type="text/javascript" src="js/plugins/sui/sui.min.js"></script>
</body>
</html>